package mydelay

import (
	"time"
)

func ticktimeget() uint32{
	t := time.Now().UnixNano()
	t /= (1000*1000)
	return uint32(t)
}

func app_get_systime() uint32{
	return ticktimeget()
}

func App_sleep(ptcnt *uint32, u_ms uint32){
	*ptcnt = app_get_systime() + u_ms
}

func App_pend_wake(tcnt uint32) bool{
	off := app_get_systime()- tcnt
	if(off>0 && off<0xff000000){
		return true
	}else{
		return false
	}
}


